\(\int (d \cot (e+f x))^n \csc (e+f x) \, dx\) [49]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 17, antiderivative size = 77 \[ \int (d \cot (e+f x))^n \csc (e+f x) \, dx=-\frac {(d \cot (e+f x))^{1+n} \csc (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1+n}{2},\frac {2+n}{2},\frac {3+n}{2},\cos ^2(e+f x)\right ) \sin ^2(e+f x)^{\frac {2+n}{2}}}{d f (1+n)} \]

[Out]

-(d*cot(f*x+e))^(1+n)*csc(f*x+e)*hypergeom([1+1/2*n, 1/2+1/2*n],[3/2+1/2*n],cos(f*x+e)^2)*(sin(f*x+e)^2)^(1+1/
2*n)/d/f/(1+n)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {2697} \[ \int (d \cot (e+f x))^n \csc (e+f x) \, dx=-\frac {\csc (e+f x) \sin ^2(e+f x)^{\frac {n+2}{2}} (d \cot (e+f x))^{n+1} \operatorname {Hypergeometric2F1}\left (\frac {n+1}{2},\frac {n+2}{2},\frac {n+3}{2},\cos ^2(e+f x)\right )}{d f (n+1)} \]

[In]

Int[(d*Cot[e + f*x])^n*Csc[e + f*x],x]

[Out]

-(((d*Cot[e + f*x])^(1 + n)*Csc[e + f*x]*Hypergeometric2F1[(1 + n)/2, (2 + n)/2, (3 + n)/2, Cos[e + f*x]^2]*(S
in[e + f*x]^2)^((2 + n)/2))/(d*f*(1 + n)))

Rule 2697

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*Sec[e + f
*x])^m*(b*Tan[e + f*x])^(n + 1)*((Cos[e + f*x]^2)^((m + n + 1)/2)/(b*f*(n + 1)))*Hypergeometric2F1[(n + 1)/2,
(m + n + 1)/2, (n + 3)/2, Sin[e + f*x]^2], x] /; FreeQ[{a, b, e, f, m, n}, x] &&  !IntegerQ[(n - 1)/2] &&  !In
tegerQ[m/2]

Rubi steps \begin{align*} \text {integral}& = -\frac {(d \cot (e+f x))^{1+n} \csc (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1+n}{2},\frac {2+n}{2},\frac {3+n}{2},\cos ^2(e+f x)\right ) \sin ^2(e+f x)^{\frac {2+n}{2}}}{d f (1+n)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.40 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.90 \[ \int (d \cot (e+f x))^n \csc (e+f x) \, dx=-\frac {(d \cot (e+f x))^n \operatorname {Hypergeometric2F1}\left (-n,-\frac {n}{2},1-\frac {n}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \left (\cos (e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right )\right )^{-n}}{f n} \]

[In]

Integrate[(d*Cot[e + f*x])^n*Csc[e + f*x],x]

[Out]

-(((d*Cot[e + f*x])^n*Hypergeometric2F1[-n, -1/2*n, 1 - n/2, Tan[(e + f*x)/2]^2])/(f*n*(Cos[e + f*x]*Sec[(e +
f*x)/2]^2)^n))

Maple [F]

\[\int \left (d \cot \left (f x +e \right )\right )^{n} \csc \left (f x +e \right )d x\]

[In]

int((d*cot(f*x+e))^n*csc(f*x+e),x)

[Out]

int((d*cot(f*x+e))^n*csc(f*x+e),x)

Fricas [F]

\[ \int (d \cot (e+f x))^n \csc (e+f x) \, dx=\int { \left (d \cot \left (f x + e\right )\right )^{n} \csc \left (f x + e\right ) \,d x } \]

[In]

integrate((d*cot(f*x+e))^n*csc(f*x+e),x, algorithm="fricas")

[Out]

integral((d*cot(f*x + e))^n*csc(f*x + e), x)

Sympy [F]

\[ \int (d \cot (e+f x))^n \csc (e+f x) \, dx=\int \left (d \cot {\left (e + f x \right )}\right )^{n} \csc {\left (e + f x \right )}\, dx \]

[In]

integrate((d*cot(f*x+e))**n*csc(f*x+e),x)

[Out]

Integral((d*cot(e + f*x))**n*csc(e + f*x), x)

Maxima [F]

\[ \int (d \cot (e+f x))^n \csc (e+f x) \, dx=\int { \left (d \cot \left (f x + e\right )\right )^{n} \csc \left (f x + e\right ) \,d x } \]

[In]

integrate((d*cot(f*x+e))^n*csc(f*x+e),x, algorithm="maxima")

[Out]

integrate((d*cot(f*x + e))^n*csc(f*x + e), x)

Giac [F]

\[ \int (d \cot (e+f x))^n \csc (e+f x) \, dx=\int { \left (d \cot \left (f x + e\right )\right )^{n} \csc \left (f x + e\right ) \,d x } \]

[In]

integrate((d*cot(f*x+e))^n*csc(f*x+e),x, algorithm="giac")

[Out]

integrate((d*cot(f*x + e))^n*csc(f*x + e), x)

Mupad [F(-1)]

Timed out. \[ \int (d \cot (e+f x))^n \csc (e+f x) \, dx=\int \frac {{\left (d\,\mathrm {cot}\left (e+f\,x\right )\right )}^n}{\sin \left (e+f\,x\right )} \,d x \]

[In]

int((d*cot(e + f*x))^n/sin(e + f*x),x)

[Out]

int((d*cot(e + f*x))^n/sin(e + f*x), x)